<?php
/**
 * Description of Code
 *
 * @author damianociarla
 */
abstract class BXDValidatorCode
{
    /**
	 * Invalid url
	 */
	public static $checkUrl = "001";

	/**
	 * Invalid email
	 */
	public static $checkEmail = "002";

	/**
	 * Invalid ip
	 */
	public static $checkIP = "003";

	/**
	 * Invalid credit card
	 */
	public static $checkCreditCard = "004";

	/**
	 * Invalid American Express credit card number
	 */
	public static $checkCcAmericanExpress = "005";

	/**
	 * Invalid Discover credit card number
	 */
	public static $checkCcDiscover = "006";

	/**
	 * Invalid Diners Club credit card number
	 */
	public static $checkCcDinersClub = "007";

	/**
	 * Invalid Master Card number
	 */
	public static $checkCcMasterCard = "008";

	/**
	 * Invalid Visa card number
	 */
	public static $checkCcVisa = "009";

	/**
	 * Invalid datetime value
	 */
	public static $checkDateTime = "010";

	/**
	 * Invalid date value
	 */
	public static $checkDate = "011";

	/**
	 * This field is required
	 */
	public static $checkRequired = "012";

	/**
	 * Unmatched value
	 */
	public static $checkInValue = "013";

	/**
	 * Value is not an integer
	 */
	public static $checkInteger = "014";

	/**
	 * Value is not a valid price amount
	 */
	public static $checkPrice = "015";

	/**
	 * Value is not a valid float value
	 */
	public static $checkFloat = "016";

	/**
	 * Value is not a digit
	 */
	public static $checkDigit = "017";

	/**
	 * Value can only consist of letters or digits
	 */
	public static $checkAlphaNumeric = "018";

	/**
	 * Value too long
	 */
	public static $checkMaxLength = "019";

	/**
	 * Value that is too short
	 */
	public static $checkMinLength = "020";

	/**
	 * Value too large
	 */
	public static $checkMaxValue = "021";

	/**
	 * Value too small
	 */
	public static $checkMinValue = "022";

	/**
	 * Nome del campo
	 *
	 * @var string
	 */
	protected $_field;

	/**
	 * Valore da controllare
	 *
	 * @var string
	 */
    protected $_value;

	/**
	 * Parametri aggiuntivi necessari al controllo
	 *
	 * @var string
	 */
    protected $_params = array();

	public function field($field = null)
	{
		if($field === null)
			return $this->_field;

		$this->_field = $field;
	}

	public function value($value = null)
	{
		if($value === null)
			return $this->_value;

		$this->_value = $value;
	}

	public function params()
	{
		$params = func_get_args();

		if(!count($params))
			return $this->_params;

		$this->_params = $params;
	}
}
?>
